<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <title>考试系统考生注册</title>
    <th:block th:include="fragment_header :: header">
    </th:block>
</head>


<body>
<div class="d-flex align-items-center justify-content-center vh-100">

    <form method="post" th:object="${studentModel}" th:action="@{ /student/saveEdit }" class="w-25 p-3 "
          style="background-color: #e3f2fd;">
        <div><h2>用户信息修改</h2></div>

        <!--error massage-->
        <div class="alert alert-warning" role="alert" th:if="${ #fields.hasErrors() }">
            <ul>
                <li th:each="err : ${ #fields.allDetailedErrors() }" style="list-style-type:none">&nbsp;<span
                        th:text="${ err.message }"></span>
                    <button type="button" class="btn-close" data-bs-dismiss="alert"></button>
                </li>

            </ul>
        </div>

        <div class="mb-6" style="display:none">
            <label for="inputID" class="form-label">ID</label>
            <input th:field="*{id}" type="text" class="form-control" id="inputID" required>
        </div>

        <div class="mb-6">
            <label for="inputName" class="form-label">姓名</label>
            <input th:field="*{name}" type="text" class="form-control" id="inputName" required>
        </div>

        <div class="mb-6">
            <label for="inputNum" class="form-label">工号</label>
            <input th:field="*{employeeNo}" type="text" class="form-control" id="inputNum" required>
        </div>

        <div class="mb-6">
            <label for="inputMobile" class="form-label">手机号</label>
            <input th:field="*{mobile}" type="text" class="form-control" id="inputMobile">
        </div>

        <div class="mb-6">
            <label for="inputEmail4" class="form-label">Email</label>
            <input th:field="*{email}" type="email" class="form-control" id="inputEmail4">
        </div>

        <div class="mb-6">
            <label for="inputGender" class="form-label">性别</label>
            <select id="inputGender" class="form-select" name="gender">
                <option value="2">女</option>
                <option value="1">男</option>
            </select>
        </div>

        <div class="mb-6">
            <label for="olePassword" class="form-label">原密码</label>
            <input type="password" class="form-control" id="olePassword" th:field="*{password}">
        </div>

        <div class="mb-6">
            <label for="newPassword" class="form-label">新密码</label>
            <input type="password" class="form-control" id="newPassword" name="Password1">
        </div>

        <div class="mb-6">
            <label for="confirmPassword" class="form-label">确认新密码</label>
            <input type="password" class="form-control" id="confirmPassword" name="Password2">
        </div>




        <div class="d-flex align-items-center justify-content-center" style="position:relative;top:8px">
        <span class="mb-6">
        <a th:href="@{ ${ #mvc.url('SC#management').build() } }" class="btn btn-primary"
           style="position:relative;right:20px">返回</a>
        </span>

        <span>
        <button type="submit" class="btn btn-primary" name="saveEdit" style="position:relative;left:20px">保存</button>
        </span>
        </div>


    </form>
</div>

</body>

</html>